import { connect } from 'dva';
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';

import PositionThroughQuery from '@/src/routes/reportingServices/positionThroughQuery/index1';

import styles from './index.less';

import CardC from '../../Barra/comps/cardC';

@connect(({ loading }) => ({
  loading,
}))
class PositionQuery extends PureComponent {
  static defaultProps = {
    onSearchClick: () => {}, // 点查询并且抛出产品名称和查询日期
  };

  render() {
    const { onSearchClick } = this.props;
    return (
      <div className={styles.positionQuery}>
        <div>
          <CardC title='持仓查询' type='33' showContent={true} titleIsShow={false} />
          <div style={{ padding: '12px 20px' }}>
            <PositionThroughQuery showOnly={this.props.showOnly} pageType={2} onSearchClick={onSearchClick} />
          </div>
        </div>
      </div>
    );
  }
}
PositionQuery.propTypes = {
  onSearchClick: PropTypes.func, // 点查询并且抛出产品名称和查询日期
};
export default PositionQuery;
